0a591b
@@ -1092,6 +1092,7 @@
public int execute() {
         SessionState.get().getHiveHistory().printRowCount(queryId);
       }
     } catch (Exception e) {
+      ctx.restoreOriginalTracker();
       if (SessionState.get() != null) {
         SessionState.get().getHiveHistory().setQueryProperty(queryId, Keys.QUERY_RET_CODE,
             String.valueOf(12));
